package com.tang.dao;

import com.tang.bean.Book;
import com.tang.bean.User;

import java.sql.SQLException;
import java.util.List;

public interface BookDao {
  List<Book> selectBookList() throws Exception;
  void deleteBook(Integer bookId) throws Exception;
  void insertBook(Book book) throws Exception;
  Book selectBookByPrimaryKey(Integer bookId) throws Exception;
  void updateBook(Book book) throws Exception;
  void updateBookArr(Object[][] bookArrParam);
  Integer getBookCount() throws Exception;
  List<Book> getPageItems(Integer pageBegin,Integer pageSize) throws Exception;

  Integer getBookCountByPrice(Integer min, Integer max) throws Exception;

  List<Book> getPageItemsByPrice(Integer begin, Integer pageSize, Integer min, Integer max) throws Exception;

  Integer getBookCountByType(String typeId) throws Exception;

  List<Book> getPageItemsByType(Integer pageBegin, Integer maxPageSize, String typeId) throws Exception;

  Integer getBookCountByKey(String key);

  List<Book> getPageItemsByKey(Integer pageBegin, Integer maxPageSize, String key);
}
